package com.kws.merchant.domain;


import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 订单(Order)表实体类
 *
 * @author yxy
 * @since 2024-10-22 17:37:48
 */
@Data
@ApiModel("订单")
@TableName(value = "tb_order")
public class Order extends Model<Order> implements Serializable {
    private static final long serialVersionUID = 743130846809652394L;

    @TableId(type = IdType.AUTO)
    @ApiModelProperty("$column.comment")
    private Long id;

    @ApiModelProperty("订单编号")
    private String orderNo;

    @ApiModelProperty("用户ID")
    private Long userId;

    @ApiModelProperty("商品id")
    private Long goodsId;

    @ApiModelProperty("商品名称")
    private String goodsName;

    @ApiModelProperty("商品图片")
    private String goodsImg;

    @ApiModelProperty("商家id")
    private Long merchantId;

    @ApiModelProperty("商家名称")
    private String merchantName;

    @ApiModelProperty("规格型号")
    private String specificationModel;

    @ApiModelProperty("颜色")
    private String goodsColor;

    @ApiModelProperty("订单金额")
    private BigDecimal orderPrice;

    @ApiModelProperty("收货地址id")
    private Long shippingAddressId;

    @ApiModelProperty("收货人电话")
    private String consigneePhone;

    @ApiModelProperty("收货人")
    private String consignee;

    @ApiModelProperty("收货人地址")
    private String address;

    @ApiModelProperty("商品数量")
    private Integer goodsCount;


    @ApiModelProperty("订单状态0待付款 1已支付 2待发货 3待收货 4已完成 5已取消 6售后中 7已售后 8待签合同")
    private Integer status;

    @ApiModelProperty("付款时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GTM+8")
    private LocalDateTime payTime;

    @ApiModelProperty("发货时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GTM+8")
    private LocalDateTime sendTime;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GTM+8")
    @ApiModelProperty("创建时间")
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GTM+8")
    @ApiModelProperty("修改时间")
    private Date updateTime;

    @ApiModelProperty("方案id")
    private Long schemeId;

    @ApiModelProperty("类型0设备 1商品服务")
    private Integer type;

    @ApiModelProperty(value = "可用状态：0-不可用，1-可用")
    private String enable;

    @ApiModelProperty("留言")
    private String leaveWord;

    @ApiModelProperty("快递单号")
    private String trackingNumber;

    @ApiModelProperty("快递公司")
    private String expressCompany;

    @ApiModelProperty("付款方式0自付 1贷款")
    private Integer payWay;

    @ApiModelProperty(value = "物流状态：0-揽收，1-在途，2-派件，3-签收，4-退回，5-退签，6-转投，7-疑难，8-清关，9-拒签")
    private String logisticsStatus;

    @ApiModelProperty(value = "当前位置")
    private String currentAddress;

    @ApiModelProperty(value = "预计到达时间")
    private String estimatedTime;

    @ApiModelProperty("是否评价(0未评价 1已评价)")
    private Integer isEvaluate;

    @ApiModelProperty("项目id")
    private Long itemId;

    @ApiModelProperty("发货地址")
    private String sendAddress;

    @ApiModelProperty("场站类型1-光伏 2-諸能 3-风点 4-充电粧 5-微网")
    private Integer projectType;
}
